package club.kingyin.kyblog.core.utils.log;

import org.slf4j.Logger;

/**
 * @author : kingyins
 * @version : 1.0
 * @program : Ky-Blog
 * @description : 控制台输出 优先级最低
 * @create : 2021年08月13日 16:07
 **/
@Priority(99)
public class PostProcessorConsole implements LogPostProcessor<Object>{
    @Override
    public void PostProcessorLog(LogResult logResult, Logger log,Object handler) {
        log.info("================= [{}] 执行 于 [{}] =================",logResult.getModule(),logResult.getOperator());
        log.info("调用方法：[{}]", logResult.getMethod());
        log.info("参数：{}", logResult.getParams());
        log.info("返回值：[{}]", logResult.getResult().hashCode());
        if (logResult.getMsg()!=null) log.info("异常：[{}]",logResult.getMsg());
        log.info("耗时：[{}ms]", logResult.getTime());
        log.info("来源：[{}]", logResult.getSources());
        log.info("调用时间：[{}]", logResult.getDate());
    }
}
